#ifdef _WIN32
#include "file_util.h"
#include <Windows.h>
#include <vector>
using namespace krryn::core;

std::vector<file_info> krryn::core::files_in_dir(const std::string &a_Directory, const std::string &a_Ext){
	WIN32_FIND_DATAA f;
	std::vector<file_info> result;
	for(HANDLE h = ::FindFirstFileA((a_Directory + "/*." + a_Ext).c_str(), &f); ::FindNextFileA(h, &f); ){
		file_info info;
		/// TODO: convert to Unix epoch
		info.m_Created = f.ftCreationTime.dwLowDateTime;
		info.m_Size = f.nFileSizeLow;
		info.m_Filename = f.cFileName;
		result.push_back(info);
	}
	return result;
}

#endif